﻿define(function (require) {
    var service = require('ezdesk/utility/service');
    var testLogin = function () {
        var flag = false;

        service.TestLogin_Sync(function (e) {
            if (e.Status == "Success") {
                flag = true;
            } else {
                //todo:么有登录！
                //alert('没有登录！')
                window.parent.postMessage('login-failed', '*');
                window.postMessage('login-failed', '*');
            }
        });

        return flag;
    };
    return testLogin();
});